﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace OrderForm
{
   public partial class ThirdForm : Form
   {
      public const int WM_NCLBUTTONDOWN = 0xA1;
      public const int HTCAPTION = 0x2;
      [DllImportAttribute("user32.dll")]
      public static extern bool ReleaseCapture();
      [DllImportAttribute("user32.dll")]
      public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);

      public ThirdForm()
      {
         InitializeComponent();
         this.FormBorderStyle = FormBorderStyle.None;
         this.MouseDown += new MouseEventHandler(Window_MouseDown);
         SetStyle(ControlStyles.SupportsTransparentBackColor, true);
         this.BackColor = Color.WhiteSmoke;
         this.TransparencyKey = Color.WhiteSmoke;
      }

      private void Window_MouseDown(object sender, MouseEventArgs e)
      {
         if (e.Button == MouseButtons.Left)
         {
            ReleaseCapture();
            SendMessage(Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
         }
      }

      // Completely exit the application
      private void buttonExit_Click(object sender, EventArgs e)
      {
         Application.Exit();
      }

      // Minimize window
      private void buttonMinimize_Click(object sender, EventArgs e)
      {
         WindowState = FormWindowState.Minimized;
      }

      // Official logo link
      private void OfficialWebButton_Click(object sender, EventArgs e)
      {
         System.Diagnostics.Process.Start("http://www.mcdonalds.com.tw/");
      }

      private void nextButton1_Click(object sender, EventArgs e)
      {
         this.Hide();
         new Loader().Show();
      }

      private void button1_Click(object sender, EventArgs e)
      {
 


      }
   }
}
